package com.eggy648.moreeggs.event;

import com.eggy648.moreeggs.achievement.AchievementsLoader;
import com.eggy648.moreeggs.item.ItemLoader;
import net.minecraftforge.event.entity.player.PlayerEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;

import java.awt.event.ContainerEvent;

/**
 * Created by Cheese on 2017/2/26.
 * subscribe crafting events
 */
public class CraftingEvents {
    @SubscribeEvent
    public void onCraft(net.minecraftforge.fml.common.gameevent.PlayerEvent.ItemCraftedEvent event)
    {
        if(event.crafting.getItem()== ItemLoader.ironEgg)
        {
            event.player.addStat(AchievementsLoader.ironEgg);
        }
    }
}
